package com.hqd.jjvm.rtda.memory;

import java.util.LinkedList;
import java.util.List;

public class JHeap {
    private static final List<Byte[]> MEM = new LinkedList<>();
    private static int nextAddress = 0;

    public static long allocate(long size) {
        Byte[] bytes = new Byte[(int) size];
        MEM.set(nextAddress, bytes);
        return nextAddress++;
    }
}
